Republican loyalty test brews as president-elect’s support this year for popular social-media app runs headlong into tough-on-Beijing vows.